<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://www.ufida.com/lfw" prefix="lfw" %>
<%@ taglib uri="http://www.ufida.com/uif" prefix="uif" %>
<%@ taglib uri="http://www.ufida.com/lfwtool" prefix="lfwtool" %> 
<%@ taglib uri="http://www.ufida.com/multilang" prefix="ml" %>
<html>
	<head>
		<lfw:base/>
		<lfw:head/>
		<uif:import/>
		<script type='text/javascript' src='/lfw/frame/script/mvc/bill/querytemplate/QueryTemplatePanel.js'></script>
		<script type='text/javascript' src='/lfw/frame/script/mvc/bill/querytemplate/QueryTemplateController.js'></script>
		<script type='text/javascript' src='/lfw/frame/script/mvc/bill/querytemplate/QueryTemplateProcessor.js'></script>
		<script type='text/javascript' src='/lfw/frame/script/mvc/bill/querytemplate/BetweenPanel.js'></script>
	</head>
	<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" scroll=no onload="pageBodyScript()">
		<lfw:pageModel className="nc.lfw.querytemplate.model.QueryTemplatePageModel"> 
			<lfw:contextmenu id="queryTemplateContextMenu"/>
			<lfw:contextmenu id="saveContextMenu"/>
			<lfw:layout type="border">
				<lfw:layoutPanel position="center">
					<lfw:spliter divideSize="0.25" id="spliter1" orientation="h">
						<lfw:spliterPanelOne>
							<lfw:border width="1">
							<lfw:tab id="conditionTab">
								<lfw:tabitem id="nowCondition">
									<lfw:tree id="queryTemplateTree" />
								</lfw:tabitem>
								<lfw:tabitem id="savedCondition">
									<div id="favoritDiv" style="height:24px;background:#F0EFE7"></div>
									<lfw:tree id="savedTree" />
								</lfw:tabitem>	
							</lfw:tab>
							</lfw:border>
						</lfw:spliterPanelOne>
						<lfw:spliterPanelTwo>
							<lfw:tab id="sqlTab">
								<lfw:tabitem id="normalTab">
									<div id="$d_normalPanel" style="width:100%;height:100%;overflow-y:scroll;"></div>
								</lfw:tabitem>
								<lfw:tabitem id="advTab">
									<lfw:layout type="flowv">
										<lfw:layoutPanel>
											<div id="$d_advancePanel" style="width:100%;"></div>
										</lfw:layoutPanel>
										<lfw:layoutPanel>
											<lfw:tree id="advanceTree" />
										</lfw:layoutPanel>
									</lfw:layout>
								</lfw:tabitem>	
							</lfw:tab>
						</lfw:spliterPanelTwo>
					</lfw:spliter>
				</lfw:layoutPanel>
								
				<lfw:layoutPanel position="bottom" height="35">
					<lfw:layout type="flowh">
						<lfw:layoutPanel align="right">
							<lfw:button id="okBt"/>
						</lfw:layoutPanel>
						<lfw:layoutPanel width="100">
							<lfw:button id="cancelBt"/>
						</lfw:layoutPanel>
					</lfw:layout>
				</lfw:layoutPanel>
			</lfw:layout>
			<lfw:dialog id="conditionDialog">
				<lfw:layout type="border">
					<lfw:layoutPanel position="top" height="20"/>
					<lfw:layoutPanel position="center">
						<lfw:layout type="flowh">
							<lfw:layoutPanel valign="middle">
								<div id="$d_dynCaption" style="width:100%;height:100%;"></div>
							</lfw:layoutPanel>
							<lfw:layoutPanel valign="middle" width="60">
								<div id="$d_dynCond" style="width:100%;height:100%;"></div>
							</lfw:layoutPanel>
							<lfw:layoutPanel valign="middle">
								<div id="$d_dynValue" style="width:100%;height:100%;"></div>
							</lfw:layoutPanel>
						</lfw:layout>
					</lfw:layoutPanel>
					<lfw:layoutPanel position="bottom" height="30">
						<lfw:layout type="flowh">
							<lfw:layoutPanel valign="middle">
								<lfw:button id="preBt"/>
							</lfw:layoutPanel>
							<lfw:layoutPanel valign="middle">
								<lfw:button id="nextBt"/>
							</lfw:layoutPanel>
							<lfw:layoutPanel valign="middle">
								<lfw:button id="okBt1"/>
							</lfw:layoutPanel>
						</lfw:layout>
					</lfw:layoutPanel>
				</lfw:layout>
			</lfw:dialog>
			
			<lfw:dialog id="saveDialog">
				<lfw:layout type="flowv">
					<lfw:layoutPanel height="60">
						<lfw:layout type="flowh">
							<lfw:layoutPanel width="200">
								<lfw:label id="saveLabel"/>
							</lfw:layoutPanel>
							<lfw:layoutPanel>
								<lfw:textcomp id="saveText"/>
							</lfw:layoutPanel>
						</lfw:layout>
					</lfw:layoutPanel>
					<lfw:layoutPanel height="60">
						<lfw:layout type="flowh">
							<lfw:layoutPanel width="200">
								<lfw:button id="saveOkBt"/>
							</lfw:layoutPanel>
							<lfw:layoutPanel>
								<lfw:button id="saveCancelBt"/>
							</lfw:layoutPanel>
						</lfw:layout>
					</lfw:layoutPanel>
				</lfw:layout>
			</lfw:dialog>
		</lfw:pageModel>
		<script>
		<%@ include file="querytemplateqcg.jsp"%>
		</script>
	</body>
</html>